package erp.education.server.db.implementation.setup.school;

 

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import erp.education.server.db.entites.setup.school.Schools;
import erp.education.server.db.exceptions.DbExceptions;
import erp.education.server.db.implementation.common.BaseDAO;
import erp.education.server.db.interfaces.setup.school.SchoolDAOI;
@Component("schoolDao")
public class SchoolDAO extends BaseDAO implements SchoolDAOI {

	@Override
	public Schools getSchool(String registerId) {
		// TODO Auto-generated method stub
		Schools school=null;
		Map params=new HashMap();
		params.put("registerId", registerId);
		
		
		school=(Schools)getSingleResult("select school from Schools school where school.registerId=:registerId ", params);
	 
		 
		 
		return school;
	}
	@Override
	public List<Schools> getSchools() {
		// TODO Auto-generated method stub
		List<Schools> schools=null;
		Map params=new HashMap();
		schools=(List<Schools>) getResultList("select school from Schools school  ", params);
			return schools;
	}
}
